﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:winforms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
        xmlns:local="clr-namespace:WpfPreviewerDemo"
        xmlns:WpfDocumentPreviewer="clr-namespace:WpfDocumentPreviewer;assembly=WpfDocumentPreviewer" x:Class="WpfPreviewerDemo.MainWindow"
        Title="WPF Document Previewer Control Demo" Height="700" Width="525"
        x:Name="winMainWindow">

    <DockPanel  Background="{DynamicResource {x:Static SystemColors.GradientActiveCaptionBrushKey}}">

        <Grid DockPanel.Dock="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="24"/>
            </Grid.ColumnDefinitions>
            
            <Button Content="Select File..." Height="32" Margin="8,4,4,4" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Button_Click_1" Padding="4,2,4,4" Foreground="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}" BorderBrush="{x:Null}" BorderThickness="0"/>
            <TextBlock Grid.Column="1" x:Name="lblFileName" Text="{Binding ElementName=previewControl, Path=FileName}" Height  ="18" Margin="0,6" Foreground="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}" HorizontalAlignment="Left" />
            <Image Grid.Column="2" x:Name="imgExtension" Height="18" HorizontalAlignment="Right" Width="18" Margin="4,11,2,11" Source="{Binding ElementName=previewControl, Path=ImageSource}" />
        </Grid>

        <WpfDocumentPreviewer:PreviewerControl  x:Name="previewControl" />

    </DockPanel>
</Window>
 